const {http,handleStr}=require("../../utils/utils")
Page({
    data: {
        movie:[]
    },
    onLoad: function (options) {
        var url=`http://47.108.197.28:4000/api/movie/top250`
        http({
            url,
            success:res=>{
                // console.log(res.data.res)
                var movie=[]; 
                var movies=res.data.res;
                movies.forEach(item=>{
                    var{pic,title}=item;
                    movie.push({pic,title:handleStr(title)})
                })
                this.setData({
                    movie
                })
            }
        })
    },

   
})